package com.steamedfish.auctioncloudgatewayserver.filter;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

/**
 * @author meetml
 */

public enum GateWayFilterRouteWhiteList {
    //放过访问授权服务其接口的拦截
    AUCTION_SEC_SERVER_OAUTH("/auction-security-server-oauth"),
    AUCTION_SEC_SERVER_OAUTH_GEOCODE("/auction-security-server-oauth/auctionsecurityserveroauth2/userEntiry/getcode"),
    AUCTION_SEC_SERVER_OAUTH_REGISTER("/auction-security-server-oauth/auctionsecurityserveroauth2/userEntiry/register"),
    AUCTION_SEC_SERVER_OAUTH_LOGIN("/auction-security-server-oauth/login"),
    //放过访问资源服务器查询接口
    AUCTION_ITEM_SERVER_SEARCH("/auction-item-server/auctionitemserver/auctionItem/essearch"),
    AUCTION_ITEM_SERVER_GITES("/auction-item-server/auctionitemserver/auctionItem/getes"),
    AUCTION_ITEM_SERVER_IMAGE("/auction-item-server//auctionitemserver/auctionItemImage/upload");
    //放过访问拍卖逻辑服务其的接口
//    AUCTION_CLOUD_PROCESS("/auction-cloud-process/auctioncloudprocess/auctionRegisterEntity/registertoauction");


    private final String path;

    GateWayFilterRouteWhiteList(String s) {
        this.path = s;
    }

    public static List<String> getAllPath(){
        GateWayFilterRouteWhiteList[] gateWayFilterRouteWhiteLists = GateWayFilterRouteWhiteList.values();
        List<String> strings = new ArrayList<>();
        for (int i = 0; i < gateWayFilterRouteWhiteLists.length; i++) {
            strings.add(gateWayFilterRouteWhiteLists[i].path);
        }
        return strings;
    }
}